/**
 *  消息类型转化 指令
 *  0 => 系统消息
 *  1 => 节日祝福
 *  2 => 用户预约
 *
 */

import type { App } from 'vue'
export default function vFormatTime(app: App<Element>) {
  app.directive('conversion-mes', {
    created(el) {
      switch (el.textContent * 1) {
        case 0:
          el.textContent = '系统消息'
          break
        case 1:
          el.textContent = '节日祝福'
          break
        case 2:
          el.textContent = '用户预约'
          break
      }
    }
  })
}
